You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TOpenCLMtxVec Class > TOpenCLMtxVec Methods > RealToCplx Method > TOpenCLMtxVec.RealToCplx Method ([In] TOpenCLMtxVec, [In] TOpenCLMtxVec)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TOpenCLMtxVec.RealToCplx Method ([In] TOpenCLMtxVec, [In] TOpenCLMtxVec)

Constructs a complex object from two real objects.

Syntax
C#
Visual Basic
public TOpenCLMtxVec RealToCplx([In] TOpenCLMtxVec ReVec, [In] TOpenCLMtxVec ImVec);

Construct a complex object from the ReVec (real part) and the ImVec (imaginary part) objects. The results are stored in the calling object. Size and TOpenCLBase.ComplexComplexproperties of the calling object are set implicitly to match ReVec and ImVec objects. An exception is raised if ReVec or ImVec TOpenCLBase.ComplexComplexproperty is True.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TOpenCLVector a,b,c; clMtxVec.CreateIt(out a, out b, out c); try { a.CopyCplxFromArray( new double[] {1,2, 3,4}); // 1+2i ; 3+4i b.CopyCplxFromArray( new double[] {2,2,3,4}); // 2+2i ; 3+4i c.RealToCplx(a,b); } finally { clMtxVec.FreeIt(ref a, ref b, ref c); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!